/*
 *    Copyright (FlushMarkPriceDTO) 2018-2025, lengleng All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the pig4cloud.com developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: lengleng (wangiegie@gmail.com)
 */

package com.pig4cloud.pigx.robot.entity;


import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.pig4cloud.pigx.common.customize.utils.serializer.BigDecimalToPlainStringSerializer;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 行情抓取记录表
 *
 * @date 2022-08-11 10:43:37
 */
@Data
@TableName("ripple_robot_market_record")
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "行情抓取记录表")
public class RobotMarketRecord extends Model<RobotMarketRecord> {

	private static final long serialVersionUID = 1L;

	/**
	 * 主键
	 */
	@TableId(type = IdType.ASSIGN_ID)
	@ApiModelProperty(value = "主键")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long id;

	/**
	 * 币对id
	 */
	@ApiModelProperty(value = "币对id")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long symbolId;

	/**
	 * 币对名称
	 */
	@ApiModelProperty(value = "币对名称")
	private String symbolName;

	/**
	 * 来源
	 */
	@ApiModelProperty(value = "来源")
	private String source;

	/**
	 * 价格
	 */
	@ApiModelProperty(value = "价格")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal price;

	/**
	 * 时间戳（毫秒）
	 */
	@ApiModelProperty(value = "时间戳（毫秒）")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long timeStamp;

	/**
	 * 现货指数价格
	 */
	@ApiModelProperty(value = "现货指数价格")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal spotIndexPrice;

	/**
	 * 资金费率
	 */
	@ApiModelProperty(value = "资金费率")
	@JsonSerialize(using = BigDecimalToPlainStringSerializer.class)
	private BigDecimal fundingRate;

	/**
	 * 创建时间
	 */
	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	/**
	 * 创建人
	 */
	@ApiModelProperty(value = "创建人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long createBy;

	/**
	 * 修改时间
	 */
	@ApiModelProperty(value = "修改时间")
	private LocalDateTime updateTime;

	/**
	 * 修改人
	 */
	@ApiModelProperty(value = "修改人")
	@JsonSerialize(using = ToStringSerializer.class)
	private Long updateBy;

	/**
	 * 状态
	 */
	@ApiModelProperty(value = "状态")
	private String status;

	/**
	 * 是否删除（null是、0否）
	 */
	@ApiModelProperty(value = "是否删除（null是、0否）")
	private String isDeleted;

}
